home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
cuj9205.zip
/
1005048B
< prev
next >
Wrap
Text File
|
1992-06-02
|
396b
|
18 lines
Listing 2. Code for a simple filter
void simple_filter(double *x, double *y, int N,
double a, double b)
{
double y0 = 0, y1 = 0;
int i = 0;
for(; i < N; i++)
{
y[i] = a*y0 + b*y1 + x[i];
y1 = y0;
y0 = y[i];
}
}